package com.linjacy.httpproject.thread;

import com.linjacy.httpproject.entity.User;

public class UserHolder {

    private static ThreadLocal<User> userHolder = new ThreadLocal<>();

    public static User getUser() {
        return userHolder.get();
    }

    public static void remove(){
        userHolder.remove();
    }

    public static void set(User user){
        userHolder.set(user);
    }

}
